import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;


public class RepositorioDePerguntas {
	
	private int quantidadeDePerguntas;
	
	public void save(Pergunta line)throws IOException
	{
		File arquivo = new File("C:\\Users\\Douglas Mauricio\\Desktop.txt");
		FileOutputStream fos = new FileOutputStream(arquivo, false);
		fos.write(line.getBytes());
		fos.close();
	}
	    public ArrayList<String> selecionarALL() throws IOException, FileNotFoundException{
	    	
	    	FileInputStream stream = new FileInputStream("C:\\Users\\Douglas Mauricio\\Desktop.txt");
	    	InputStreamReader streamReader = new InputStreamReader(stream);
	    	BufferedReader reader = new BufferedReader(streamReader);
	    	
	    	ArrayList<String> Lresult = new ArrayList<String>();
	    	String line = "";
	    	while((line = reader.readLine())!= null){
	    		Lresult.add(line);
	    		 
	    	}
	    	return Lresult;
	    	
	    }
	    public void mostrarPerguntas()
	    {
	    	
	    }

}
